package com.xihuanjun.sdk.entity;

import com.xihuanjun.sdk.enums.SapResultEnum;
import lombok.Data;

/**
 * Copyright (C), 2024-08-26
 * FileName: SapRequestResult
 * Author:   溪浣君
 * Date:     2024-08-26 9:50
 * Description: 访问sap请求的返回结果类
 */
@Data
public class SapRequestResult {

    private SapResultEnum resultEnum;

    private String json;

    public static SapRequestResult result(SapResultEnum resultEnum,String jsonResult){
        SapRequestResult requestResult=new SapRequestResult();
        requestResult.setResultEnum(resultEnum);
        requestResult.setJson(jsonResult);
        return requestResult;
    }

    public static SapRequestResult result(SapResultEnum resultEnum){
        SapRequestResult requestResult=new SapRequestResult();
        requestResult.setResultEnum(resultEnum);
        return requestResult;
    }
}
